home *** CD-ROM | disk | FTP | other *** search
-
-
-
- DDDDIIIIFFFFFFFF((((1111)))) DDDDIIIIFFFFFFFF((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- diff - differential file and directory comparator
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ddddiiiiffffffff [----llllrrrrssss] [----SSSS_n_a_m_e] [----cccceeeeffffhhhhnnnn] [----xxxx_p_a_t] [----bbbbiiiiwwwwtttt] dir1 dir2
- ddddiiiiffffffff [----cccceeeeffffhhhhnnnn] [----bbbbiiiiwwwwtttt] file1 file2
- ddddiiiiffffffff [----DDDD_s_t_r_i_n_g] [----bbbbiiiiwwww] file1 file2
- GNU diff options:
- ddddiiiiffffffff [----####] [----aaaaBBBBddddHHHHNNNNppppqqqqTTTTuuuuvvvv] [----CCCC_n_u_m] [----FFFF_e_x_p] [----IIII_e_x_p] [----LLLL_l_a_b]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- If both arguments are directories, _d_i_f_f sorts the contents of the
- directories by name, and then runs the regular file _d_i_f_f algorithm
- (described below) on text files which are different. Binary files which
- differ (unless ----aaaa is specified), common subdirectories, and files which
- appear in only one directory are listed. Options when comparing
- directories are:
-
- ----llll long output format; each text file _d_i_f_f is piped through _p_r(1) to
- paginate it, other differences are remembered and summarized after
- all text file differences are reported.
-
- ----rrrr causes application of _d_i_f_f recursively to common subdirectories
- encountered.
-
- ----ssss causes _d_i_f_f to report files which are the same, which are otherwise
- not mentioned.
-
- ----SSSS_n_a_m_e
- starts a directory _d_i_f_f in the middle beginning with file _n_a_m_e.
-
- ----xxxx_p_a_t
- adds _p_a_t to a list of regular expressions. There can be several
- ----xxxx_p_a_t options. Any directory or file (base) name matching one of
- the patterns is skipped. The special characters available in the
- pattern _p_a_t are similar to those used in _e_g_r_e_p(1). For example, the
- following command will ignore all "hidden" files and all RCS
- archives:
-
- diff -r '-x^\.' '-x,v$' foo bar
-
- When run on regular files, and when comparing text files which differ
- during directory comparison, _d_i_f_f tells what lines must be changed in the
- files to bring them into agreement. Except in rare circumstances, _d_i_f_f
- finds a smallest sufficient set of file differences. If neither _f_i_l_e_1
- nor _f_i_l_e_2 is a directory, then either may be given as `-', in which case
- the standard input is used. If _f_i_l_e_1 is a directory, then a file in that
- directory whose file-name is the same as the file-name of _f_i_l_e_2 is used
- (and vice versa). If both _f_i_l_e_1 and _f_i_l_e_2 are directories, then files
- (or files and directories with ----rrrr) with identical names are compared.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- DDDDIIIIFFFFFFFF((((1111)))) DDDDIIIIFFFFFFFF((((1111))))
-
-
-
- There are several options for output format; the default output format
- contains lines of these forms:
-
- _n_1 a _n_3,_n_4
- _n_1,_n_2 d _n_3
- _n_1,_n_2 c _n_3,_n_4
-
- These lines resemble _e_d commands to convert _f_i_l_e_1 into _f_i_l_e_2. The
- numbers after the letters pertain to _f_i_l_e_2. In fact, by exchanging `a'
- for `d' and reading backward one may ascertain equally how to convert
- _f_i_l_e_2 into _f_i_l_e_1. As in _e_d, identical pairs where _n_1 = _n_2 or _n_3 = _n_4 are
- abbreviated as a single number.
-
- Following each of these lines come all the lines that are affected in the
- first file flagged by `<', then all the lines that are affected in the
- second file flagged by `>'.
-
- Except for ----bbbb,,,, ----wwww,,,, ----iiii or ----tttt which may be given with any of the others,
- the following options are mutually exclusive:
-
- ----eeee produces a script of _a, _c and _d commands for the editor _e_d,
- which will recreate _f_i_l_e_2 from _f_i_l_e_1. In connection with ----eeee,
- the following shell program may help maintain multiple versions
- of a file. Only an ancestral file ($1) and a chain of version-
- to-version _e_d scripts ($2,$3,...) made by _d_i_f_f need be on hand.
- A `latest version' appears on the standard output.
-
- (shift; cat $*; echo '1,$p') | ed - $1
-
- Extra commands are added to the output when comparing
- directories with ----eeee,,,, so that the result is a _s_h(1) script for
- converting text files which are common to the two directories
- from their state in _d_i_r_1 to their state in _d_i_r_2.
-
- ----ffff produces a script similar to that of ----eeee,,,, not useful with _e_d, and
- in the opposite order.
-
- ----nnnn produces a script similar to that of ----eeee,,,, but in the opposite
- order and with a count of changed lines on each insert or delete
- command. This is the form used by the RCS commands for storing
- a revision change.
-
- ----cccc produces a diff with 3 lines of context. Use the ----CCCC_n_u_m option
- to specify the number of lines. With ----cccc the output format is
- modified slightly: the output beginning with identification of
- the files involved and their creation dates and then each change
- is separated by a line with a dozen *'s. The lines removed from
- _f_i_l_e_1 are marked with `- '; those added to _f_i_l_e_2 are marked `+
- '. Lines which are changed from one file to the other are
- marked in both files with `! '.
-
- Changes which lie within <context> lines of each other are
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- DDDDIIIIFFFFFFFF((((1111)))) DDDDIIIIFFFFFFFF((((1111))))
-
-
-
- grouped together on output.
-
- ----hhhh has no affect. It is present for compatibility with _o_d_i_f_f(1).
-
- ----DDDD_s_t_r_i_n_g causes _d_i_f_f to create a merged version of _f_i_l_e_1 and _f_i_l_e_2 on the
- standard output, with C preprocessor controls included so that a
- compilation of the result without defining _s_t_r_i_n_g is equivalent
- to compiling _f_i_l_e_1, while defining _s_t_r_i_n_g will yield _f_i_l_e_2.
-
- ----bbbb causes trailing blanks (spaces and tabs) to be ignored, and
- other strings of blanks to compare equal.
-
- ----wwww is similar to ----bbbb but causes whitespace (blanks and tabs) to be
- totally ignored. E.g., ``if ( a == b )'' will compare equal to
- ``if(a==b)''.
-
- ----iiii ignores the case of letters. E.g., ``A'' will compare equal to
- ``a''.
-
- ----tttt will expand tabs in output lines. Normal or ----cccc output adds
- character(s) to the front of each line which may foul up the
- indentation of the original source lines and make the output
- listing difficult to interpret. This option will preserve the
- original source's indentation.
-
- GGGGNNNNUUUU DDDDIIIIFFFFFFFF OOOOPPPPTTTTIIIIOOOONNNNSSSS
- ----# Show # lines (an integer) of context. This option does not
- specify an output format by itself; it has no effect unless it
- is combined with ----cccc or ----uuuu.
-
- ----aaaa Treat all files as text and compare them line-by-line, even if
- they do not appear to be text
-
- ----BBBB Ignore changes that just insert or delete blank lines.
-
- ----CCCC_n_u_m Use the context output format, showing _l_i_n_e_s (an integer) lines
- of context
-
- ----dddd Change the algorithm to find a guaranteed minimal set of
- changes. This makes diff slower (sometimes much slower).
-
- ----FFFF_e_x_p In context and unified format, for each hunk of differences,
- show some of the last preceding line that matches _e_x_p.
-
- ----HHHH Use heuristics to speed handling of large files that have
- numerous scattered small changes
-
- ----IIII_e_x_p Ignore changes that just insert or delete lines that match _e_x_p.
-
- ----LLLL_l_a_b Use _l_a_b instead of the pathname in the context format and
- unified format headers
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- DDDDIIIIFFFFFFFF((((1111)))) DDDDIIIIFFFFFFFF((((1111))))
-
-
-
- ----NNNN In directory comparison, if a file is found in only one
- directory, treat it as present but empty in the other directory.
-
- ----pppp Show which C function each change is in.
-
- ----qqqq Report only whether the files differ, not the details of the
- differences.
-
- ----TTTT Output a tab rather than a space before the text of a line in
- normal or context format. This causes the alignment of tabs in
- the line to look normal.
-
- ----uuuu Use the unified output format
-
- ----vvvv Display the version string.
-
- FFFFIIIILLLLEEEESSSS
- /usr/bin/odiff executable for _o_d_i_f_f.
- /bin/diff executable for GNU derived _d_i_f_f.
- /bin/pr executed by the ----llll option.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- bdiff(1), cc(1), cmp(1), comm(1), odiff(1), diff3(1), ed(1),
- DIFFsource(5)
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- Exit status is 0 for no differences, 1 for some differences, 2 for
- trouble.
-
- PPPPEEEERRRRFFFFOOOORRRRMMMMAAAANNNNCCCCEEEE
- The GNU derived _d_i_f_f and older BSD derived _o_d_i_f_f use different
- algorithms. If the two files to be compared fit in main memory, then
- _d_i_f_f is faster, but if they don't fit, _d_i_f_f can cause severe paging. The
- _o_d_i_f_f algorithm uses a small, fixed amount of memory even on large files.
- The multiple pass algorithm of _o_d_i_f_f is up to two or three times slower
- than _d_i_f_f, on files that fit in memory, but can be many times faster on
- files that don't fit.
-
- The _d_i_f_f command automatically invokes the _o_d_i_f_f (searching for _o_d_i_f_f
- along $$$$PPPPAAAATTTTHHHH) on files that have a combined size larger than one-fourth of
- memory size, if no GNU specific _d_i_f_f options were specified. If that
- fails, then _d_i_f_f silently does the work itself.
-
- You can force either variant: specifying -_H always gets _d_i_f_f, specifying
- _o_d_i_f_f always gets _o_d_i_f_f.
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-